﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace KPIS.GERP.GHRMS.MODEL
{
    public class PersonInfo
    {

        private string first_name;
        private string last_name;
        private string first_name_eng;
        private string last_name_eng;
        private string nick_name;
        private string full_name;
        private string full_name_eng;
        private string citizen;
        private string tax_payer;
        private string social;
        private string official;
        private string career;
        private Nullable<DateTime> birth_date;
        private int age;
        private string str_age;
        private string death_ref_no;
        private Nullable<DateTime> death_date;
        private MasNamePrefixInfo name_prefix_seq;
        private MasGenderInfo gender_seq;
        private MasReligionInfo religion_seq;
        private MasNationalitiesInfo race_nat_seq;
        private MasNationalitiesInfo nat_seq;
        private MasBloodGroupInfo blood_group;
        private MasMaritalStatusInfo mar_stat_seq;

        public PersonInfo()
        {
        }
        public PersonInfo(string FirstName, string LastName, string FirstNameEng, string LastNameEng, string NickName
            , string Citizen, string TaxPayer, string Social, string Official, MasNamePrefixInfo NamePrefix
            , MasGenderInfo Gender, MasReligionInfo Religion, MasNationalitiesInfo RaceNationalities
            , MasNationalitiesInfo Nationalities, Nullable<DateTime> BirthDate, MasBloodGroupInfo BloodGroup
            , Nullable<DateTime> DeathDate)
        {
            //this.Sequence = Sequence;
            this.FirstName = FirstName;
            this.LastName = LastName;
            this.FirstNameEng = FirstNameEng;
            this.LastNameEng = LastNameEng;
            this.NickName = NickName;
            this.Citizen = Citizen;
            this.TaxPayer = TaxPayer;
            this.Social = Social;
            this.Official = Official;
            this.NamePrefix = NamePrefix;
            this.Gender = Gender;
            this.Religion = Religion;
            this.RaceNationalities = RaceNationalities;
            this.Nationalities = Nationalities;
            this.BirthDate = BirthDate;
            this.DeathDate = DeathDate;
            this.BloodGroup = BloodGroup;
        }
        public MasNamePrefixInfo NamePrefix
        {
            get
            {
                return name_prefix_seq;
            }
            set
            {
                name_prefix_seq = value;
            }
        }

        public string FirstName
        {
            get
            {
                return first_name;
            }
            set
            {
                first_name = value;
            }
        }
        public string LastName
        {
            get
            {
                return last_name;
            }
            set
            {
                last_name = value;
            }
        }
        public string FirstNameEng
        {
            get
            {
                return first_name_eng;
            }
            set
            {
                first_name_eng = value;
            }
        }

        public string LastNameEng
        {
            get
            {
                return last_name_eng;
            }
            set
            {
                last_name_eng = value;
            }
        }
        public string NickName
        {
            get
            {
                return nick_name;
            }
            set
            {
                nick_name = value;
            }
        }
        public string FullName
        {
            get
            {
                return full_name;
            }
            set
            {
                full_name = value;
            }
        }
        public string FullNameEng
        {
            get
            {
                return full_name_eng;
            }
            set
            {
                full_name_eng = value;
            }
        }
        public MasGenderInfo Gender
        {

            get
            {
                return gender_seq;
            }
            set
            {
                gender_seq = value;
            }
        }

        public MasReligionInfo Religion
        {
            get
            {
                return religion_seq;
            }
            set
            {
                religion_seq = value;
            }
        }

        public MasNationalitiesInfo RaceNationalities
        {
            get
            {
                return race_nat_seq;
            }
            set
            {
                race_nat_seq = value;
            }
        }
        public MasNationalitiesInfo Nationalities
        {
            get
            {
                return nat_seq;
            }
            set
            {
                nat_seq = value;
            }
        }
        public string Citizen
        {
            get
            {
                return citizen;
            }
            set
            {
                citizen = value;
            }
        }
        public string TaxPayer
        {
            get
            {
                return tax_payer;
            }
            set
            {
                tax_payer = value;
            }
        }
        public string Social
        {
            get
            {
                return social;
            }
            set
            {
                social = value;
            }
        }
        public string Official
        {
            get
            {
                return official;
            }
            set
            {
                official = value;
            }
        }
        public string Career
        {
            get
            {
                return career;
            }
            set
            {
                career = value;
            }
        }
        public MasBloodGroupInfo BloodGroup
        {
            get
            {
                return blood_group;
            }
            set
            {
                blood_group = value;
            }
        }
        public Nullable<DateTime> BirthDate
        {
            get
            {
                return birth_date;
            }
            set
            {
                birth_date = value;
            }
        }
        public string BirthDateThai
        {
            get
            {
                if(!birth_date.HasValue) return string.Empty;
                DateTime dt = birth_date.Value;
                return dt.ToString("dd MMM ") + new ThaiBuddhistCalendar().GetYear(dt);
            }
        }
        public int Age
        {
            get
            {
                return age;
            }
            set
            {
                age = value;
            }
        }
        public string AgeText
        {
            get
            {
                return str_age;
            }
            set
            {
                str_age = value;
            }
        }
        public Nullable<DateTime> DeathDate
        {
            get
            {
                return death_date;
            }
            set
            {
                death_date = value;
            }
        }
        public string DeathRefNo
        {
            get
            {
                return death_ref_no;
            }
            set
            {
                death_ref_no = value;
            }
        }
        public MasMaritalStatusInfo MaritalStatus
        {
            get
            {
                return mar_stat_seq;
            }
            set
            {
                mar_stat_seq = value;
            }
        }
    }
}
